/*
 *  Created by Wu Heshun on 09-3-10.
 *  Copyright 2009 handcn. All rights reserved.
 *
 */
#ifndef _game_logic_h_
#define _game_logic_h_
#include "graphic_public.h"
#include "Td_object.h"

typedef enum {
	kGameUnStart = 0,
	kGameNormal,
	kGameCheck,
	kGamePass,
	kGameOver,
	kGameStop,
	kGameWin
}t_game_status;

namespace game_logic {	
	
	void init();
	void deinit();
	
	void mouseDown(point2d_t point);
	int CurLevel();
	int &score(int level);
	void setCurLevel(int level);
	int &totalLevel();
	
	int maxAvailableLevel();
	bool allLevelsPass();
	int &remainSteps();
	t_game_status step(float_t dt);	
	void display();
	void gameStart();
	void addTotemObject(TotemObject_t* obj);
	void nextLevel();
	bool &isMusicPlay();
	
	const std::string &getCurLevelBgImag();
};
const float_t kINTERVAL = 1.0f/ 30.f;

#endif //_game_logic_h_
